<!--Compare Box End-->
<div class="compareBox" id="comapre_div_id" style="display:<?php echo $display;?>">
<div class="compareHolder">
<?php
$form = $this->beginWidget('GxActiveForm', array(
'id' => 'compare-form',
'action' => Yii::app()->createUrl('compare/view'), 
));
?>
	<div class="container">
    	<div class="row">
        	<div class="span12">
            	<!--Mobile Compare Show/Hide Button-->
                <a href="javascript:void(0);" class="mobCompare"><em class="sprite">&nbsp;</em><span>Show Compare List</span></a>
                <!--Mobile Compare Show/Hide Button-->
            	<div id="compare-items" class="product-list">
                	<ul id="cart_comapre">
            <?php 
			
			/*echo "<pre>";
			print_r($compareIds);
			die;*/
			
			if($display==""){for($i=0;$i<count($compareIds);$i++){?>
			<?php 
			$classcoursedata = explode("@",$compareIds[$i]);
			if($classcoursedata[1]=="class"){ 
			/* This is for class*/
			$classcourseDetail = Classes::model()->findByPk($classcoursedata[0]); 
			$class_course_titile = $classcourseDetail->class_titile;
			$imagePath = ($classcourseDetail->users_id == '') ? 'backend/' . $classcourseDetail->backend_user_id : $classcourseDetail->users_id;
			$imagePath = getImagePathByClassCourse('Classes', $classcoursedata[0]);
			$imageName = (ClassImage::getPrimaryImage($classcoursedata[0]) != '') ? baseUrl() . '../../' . SkillConfig::getClassCourseImagePath($imagePath) . 'thumbs/' . ClassImage::getPrimaryImage($classcoursedata[0]) : baseUrl() . '../../' . getUploadDir() . '/no-class-image.jpg';
			} else {
			/* This is for course*/
			$classcourseDetail = Courses::model()->findByPk($classcoursedata[0]); 
			$class_course_titile = $classcourseDetail->course_titile;
			$imagePath = getImagePathByClassCourse('Courses', $classcoursedata[0]);
			$imageName = (ClassImage::getPrimaryImage($classcoursedata[0]) != '') ? baseUrl() . '../../' . SkillConfig::getClassCourseImagePath($imagePath) . 'thumbs/' . ClassImage::getPrimaryImage($classcoursedata[0]) : baseUrl() . '../../' . getUploadDir() . '/no-class-image.jpg';
			
			}
			
			$classcourseImg = '<img src="' . $imageName . '" height="70" width="70"  alt="' . $class_course_titile . '">';
			
			
			?>
					<input type="hidden" class="compareids" name="class_course_id[]" value="<?php echo $compareIds[$i];?>" />	
						<li>  
                        	<a href="javascript:void(0);" onclick="RemoveCompareList('<?php echo $classcoursedata[0];?>','<?php echo Yii::app()->session['classcoursetype'];?>');" class="sprite cross">&nbsp;</a>      
                                         	                            
                            <?php echo $classcourseImg;?>
                            <p class="product"><?php echo $class_course_titile;?></p>                           
                        </li>
						<?php } }?>
                    </ul>
                      <?php echo GxHtml::submitButton(Yii::t('app', 'Compare'),array('onClick'=>'return CheckComparedata();','class'=>'btn compareBtnl'));?><span id="copareloader" style="display:none;"><img src="<?php echo ThemePath(); ?>/images/ajax-loader-mini.gif"></img></span>
                    <div class="clear"></div>
                </div>
            </div>
        </div>
    </div>
<?php
$this->endWidget();
?>
	
</div>
<div class="comparemargin"></div>
</div>
<!--Compare Box End-->

<script type="text/javascript">
function CheckComparedata(){
var allClasses= ($('.compareids').size());
if(allClasses<2){
jAlert('There are minimum 2 classes/courses to comapre!!');
return false;
}else{
return true;
}

}

</script>


